﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMathLibrary.DataMining.ClusterAnalysis
{
    /// <summary>
    /// This class represents a result item of the self organising map.
    /// </summary>
    [Serializable]
    public class SelfOrganisingMapResultItem : ISelfOrganisingMapResultItem
    {
        /// <summary>
        /// The x position of the result item.
        /// </summary>
        private double x;

        /// <summary>
        /// The y position of the result item.
        /// </summary>
        private double y;

        /// <summary>
        /// The reference object of the item.
        /// </summary>
        private Object referenceObject;

        /// <summary>
        /// Initializes a new instance of the <see cref="SelfOrganisingMapResultItem"/> class.
        /// </summary>
        /// <param name="x">The x position of the result item.</param>
        /// <param name="y">The y position of the result item.</param>
        /// <param name="referenceObject">The reference object of the item.</param>
        public SelfOrganisingMapResultItem(double x, double y, Object referenceObject)
        {
            this.x = x;
            this.y = y;
            this.referenceObject = referenceObject;
        }

        /// <summary>
        /// Gets or sets the x position of the result item.
        /// </summary>
        /// <value>The x position of the result item.</value>
        public double X
        {
            get { return x; }
            set { x = value; }
        }

        /// <summary>
        /// Gets or sets the y position of the result item.
        /// </summary>
        /// <value>The y position of the result item.</value>
        public double Y
        {
            get { return y; }
            set { y = value; }
        }

        /// <summary>
        /// Gets or sets the reference object of the item.
        /// </summary>
        /// <value>The reference object of the item.</value>
        public object ReferenceObject
        {
            get { return referenceObject; }
            set { referenceObject = value; }
        }
    }
}